/**
 *@author huahuadavids
 *@date 2019/10/13 14:41
 */
const webpack = require("webpack");
const path = require("path");

// webpack.dll.js
module.exports = {
  entry : {
    vendor: ['jquery']
  },
  mode: 'production',
  output:{
    path: path.join(__dirname, 'dist'),
    filename: '[name].dll.js',
    library: '[name]_library',
    // 默认是var，还有commonjs commonjs2
    libraryTarget: "var"

  },
  plugins:[
    new webpack.DllPlugin({
      path: path.join(__dirname, 'dist', '[name]-manifest.json'),
      name: '[name]_library',
      context: __dirname
    })
  ]
}
